home *** CD-ROM | disk | FTP | other *** search
- ;------------------------------------------------------------------------
- ;
- ; $VER: ALock-Install 1.0 (31.7.96)
- ;
- ; Copyright (c) 1996 Janne Peräaho.
- ; All Rights Reserved.
- ;
- ;------------------------------------------------------------------------
-
- ;------------------------------------------------------------------------
- ; Prompt texts
- ;------------------------------------------------------------------------
- ;------------------------------------------------------------------------
- ; Help texts
- ;------------------------------------------------------------------------
-
- ;------------------------------------------------------------------------
- ; Install files
- ;------------------------------------------------------------------------
- ; Check if files installed
- (set #alock
- (exists "ETC:passwd"
- (noreq)
- )
- )
- (if (= #alock 0)
- (
- ; Get etc destination directory
- (set @default-dest
- (askdir
- (prompt "Select directory for\npasswd, finger.log, and motd files\nDirectory etc will be created")
- (help "")
- (default "Boot:")
- )
- )
- ; Store path
- (set #etc (tackon @default-dest "etc"))
-
- ; Create directory etc
- (makedir #etc
- (prompt "Directory etc for\npasswd, finger.log, and motd files will be created")
- (help "")
- (confirm)
- )
-
- ; Make assign
- (makeassign "ETC" #etc)
-
- ; Create passwd file
- (textfile
- (prompt "Creating default password file...")
- (help "")
- (dest "ETC:passwd")
- (append "root,root,System Administrator")
- )
- ; Create finger.log file
- (textfile
- (prompt "Creating finger.log file...")
- (help "")
- (dest "ETC:finger.log")
- (append "")
- )
- ; Install message of today
- ; Enabled?
- (set #motd
- (askchoice
- (prompt "Message Of Today")
- (help "")
- (choices "Disabled" "Enabled")
- (default 1)
- )
- )
- ; Copy MOTD
- (if(= #motd 0)
- (
- ; Disabled
- (copyfiles
- (prompt "Copying disabled MOTD...")
- (help "")
- (source "motd")
- (dest "ETC:")
- (newname "disabled_motd")
- (files)
- )
- )
- ; Else Enabled
- (
- (copyfiles
- (prompt "Copying enabled MOTD...")
- (help "")
- (source "motd")
- (dest "ETC:")
- (files)
- )
- )
- )
- ; Set host name
- ; Check if host name exists
- (set #hostname
- (exists "ENVARC:HostName"
- (noreq)
- )
- )
- (if (= #hostname 0)
- (
- ; Get hostname
- (set #hostname
- (askstring
- (prompt "\nSet computer name (HostName)")
- (help "")
- (default "AMIGA")
- )
- )
- ; Set hostname
- (textfile
- (prompt "")
- (help "")
- (dest "ENVARC:HostName")
- (append #hostname)
- )
- (textfile
- (prompt "")
- (help "")
- (dest "ENV:HostName")
- (append #hostname)
- )
- )
- )
- ; Install ALock
- ; Get commands destination directory
- (set @default-dest
- (askdir
- (prompt "Select directory for ALock command")
- (help "")
- (default "C:")
- )
- )
- (set #commands @default-dest)
- (copyfiles
- (prompt "Copying ALock...")
- (help "")
- (source "ALock")
- (dest #commands)
- (files)
- )
- ; Icon?
- (set #alockicon
- (askchoice
- (prompt "ALock\nCopy icon?")
- (help "")
- (choices "No" "ALock.info")
- (default 1)
- )
- )
- (if (= #alockicon 0)
- (copyfiles
- (prompt "Copying icon...")
- (help "")
- (source "ALock.info")
- (dest #commands)
- (files)
- (infos)
- (noposition)
- )
- )
- ; Copy docs
- (set @default-dest
- (askdir
- (prompt "Select directory for ALock documentation")
- (help "")
- (default "HELP:")
- )
- )
- (copyfiles
- (prompt "Copying documentation...")
- (help "")
- (source "Alock.doc")
- (dest @default-dest)
- (files)
- )
- )
- )
-
- ;------------------------------------------------------------------------
- ; Update User-Startup
- ;------------------------------------------------------------------------
- (set #toustartup
- (askchoice
- (prompt "Insert login procedure to the User-Startup?")
- (help "")
- (choices "No" "Standard" "Expanded")
- (default 2)
- )
- )
- (select #toustartup
- ; Don't install
- (set #command "")
- ; Standard
- (
- (set #command (cat "ASSIGN ETC: " #etc))
- (set #command (cat #command "\nPATH "))
- (set #command (cat #command #commands))
- (set #command (cat #command " ADD\nALock"))
- (startup "ALock"
- (prompt "\nInserting standard login procedure to the User-Startup...")
- (help "")
- (command #command)
- (confirm)
- )
- )
- ; Expanded
- (
- (set #command (cat "ASSIGN ETC: " #etc))
- (set #command (cat #command "\nPATH "))
- (set #command (cat #command #commands))
- (set #command (cat #command " ADD\nALock\n"))
- (set #command (cat #command "ALockPatch\nFlushLog\nUserStartup"))
- (startup "ALock"
- (prompt "\nInserting expanded login procedure to the User-Startup...")
- (help "")
- (command #command)
- (confirm)
- )
- )
- )
-
- (set @default-dest #commands)
-